<script setup>

import SvgIcon from "../../../Svglcon.vue";
import {ref} from "vue";
import RangeSelectorNoFill from "../tools/RangeSelectorNoFill.vue";
import RangeSelector from "../tools/RangeSelector.vue";
import SunForward from "../tools/sunForward.vue";

const sunStart = ref(true)
const HDRIStart = ref(true)
const skyTemperature = ref(0)
const angleSelectList = ref([
  {
    value: 'https://dummyimage.com/400/000000/ffffff',
    label: '漫反射',
  },
  {
    value: 'https://dummyimage.com/400/000000/ffffff',
    label: '漫反射',
  },
  {
    value: 'https://dummyimage.com/400/000000/ffffff',
    label: '漫反射',
  }
])
const pictureUrl = ref('')

</script>

<template>
  <div class="environmentWarp">
    <div class="environment">
      <div class="sun">
        <div class="materialMangeTitleBar">
          <div>
            <svg-icon name="close"/>
          </div>
          <div class="title">太阳</div>
          <div></div>
          <div style="width: 50px">启用</div>
          <div>
            <el-switch v-model="sunStart" style="margin-left: 5px;margin-right: 5px"></el-switch>
          </div>

        </div>
        <div class="inputSelectContain" style="height: 500px">
          <div class="controllForward">
            <sun-forward></sun-forward>


          </div>
          <div class="sliderField">
            <div class="sliderTitle">
              <div>
                方向
              </div>
              <div>

              </div>

            </div>
            <div class="valueSlider">
              <RangeSelector
                  :min="0"
                  :max="100"
                  :height="30"
                  v-model="skyTemperature"
              />
            </div>
          </div>
          <div class="sliderField">
            <div class="sliderTitle">
              <div>
                太阳亮度
              </div>
              <div>

              </div>

            </div>
            <div class="valueSlider">
              <RangeSelector
                  :min="0"
                  :max="100"
                  :height="30"
                  v-model="skyTemperature"
              />
            </div>
          </div>
          <div class="sliderField">
            <div class="sliderTitle">
              <div>
                太阳半径
              </div>
              <div>

              </div>

            </div>
            <div class="valueSlider">
              <RangeSelector
                  :min="0"
                  :max="100"
                  :height="30"
                  v-model="skyTemperature"
              />
            </div>
          </div>
          <div class="sliderField">
            <div class="sliderTitle">
              <div>
                太阳色温
              </div>
              <div>

              </div>

            </div>
            <div class="valueSlider">
              <RangeSelectorNoFill
                  :min="0"
                  :max="100"
                  :height="30"
                  v-model="skyTemperature"
              />
              <div style="width: 60px;display: flex;align-items: center;justify-content: center;">
                {{ skyTemperature }}
              </div>
            </div>


          </div>
        </div>
      </div>
      <div class="HDRI">
        <div class="materialMangeTitleBar">
          <div>
            <svg-icon name="close"/>
          </div>

          <div class="title">HDRI</div>

          <div></div>
          <div style="width: 50px">启用</div>
          <div>
            <el-switch v-model="HDRIStart" style="margin-left: 5px;margin-right: 5px"></el-switch>
          </div>
        </div>
        <div class="inputSelectContain" style="height: 580px;padding-bottom: 35px">
          <div class="pictureView"
               :style="{ backgroundImage: 'url(' + pictureUrl + ')', width: '100%', height: '100%' }"
          >


          </div>


          <div class="sliderField">
            <div class="valueSlider">
              <el-select v-model="pictureUrl" placeholder="" style="width: 100%">
                <el-option
                    v-for="item in angleSelectList"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                />
              </el-select>

              <div>
                <svg-icon name="close"></svg-icon>
              </div>
            </div>
          </div>
          <div class="sliderField">
            <div class="sliderTitle">
              <div>
                亮度
              </div>
              <div>

              </div>

            </div>
            <div class="valueSlider">
              <RangeSelector
                  :min="0"
                  :max="100"
                  :height="30"
                  v-model="skyTemperature"
              />
            </div>
          </div>
          <div class="sliderField">
            <div class="sliderTitle">
              <div>
                旋转
              </div>
              <div>

              </div>

            </div>
            <div class="valueSlider">
              <RangeSelector
                  :min="0"
                  :max="100"
                  :height="30"
                  v-model="skyTemperature"
              />
            </div>


          </div>
          <div class="sliderField">
            <div class="sliderTitle">
              <div>
                天空色温
              </div>
              <div>

              </div>

            </div>
            <div class="valueSlider">
              <RangeSelectorNoFill
                  :min="0"
                  :max="100"
                  :height="30"
                  v-model="skyTemperature"
              />
              <div style="width: 60px;display: flex;align-items: center;justify-content: center;">
                {{ skyTemperature }}
              </div>
            </div>


          </div>
          <div class="sliderField">
            <div class="sliderTitle">
              <div>
                天空颜色
              </div>
              <div>

              </div>

            </div>
            <div class="valueSlider">
              <RangeSelectorNoFill
                  :min="0"
                  :max="100"
                  :height="30"
                  v-model="skyTemperature"
              />
              <div style="width: 60px;display: flex;align-items: center;justify-content: center;">
                {{ skyTemperature }}
              </div>
            </div>
            <div class="valueSlider">
              <RangeSelectorNoFill
                  :min="0"
                  :max="100"
                  :height="30"
                  v-model="skyTemperature"
              />
              <div style="width: 60px;display: flex;align-items: center;justify-content: center;">
                {{ skyTemperature }}
              </div>
            </div>

          </div>
          <div class="sliderField">
            <div class="sliderTitle">
              <div>
                影响
              </div>
              <div>

              </div>

            </div>
            <div class="valueSlider">
              <el-select v-model="angle" placeholder="" style="width: 100%">
                <el-option
                    v-for="item in angleSelectList"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                />
              </el-select>
            </div>


          </div>
        </div>

      </div>


    </div>
  </div>


</template>

<style scoped lang="scss">
.environmentWarp {
  width: 100%;
}

.environment {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding-left: 10px;
  padding-right: 10px;

  .HDRI {

    .pictureView {
      height: 123px;
      width: 100%;

    }
  }
  .sun{
    .controllForward{
      width: 266px;
      height: 266px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
  }


  .materialMangeTitleBar {
    display: flex;
    height: 30px;
    justify-content: center;
    align-items: center;
    width: 100%;
    background-color: #EEEEEE;
    border: #CCCCCC 1px solid;

    .title {
      width: 100%;
      font-size: 14px;
      text-align: left;
      color: #999999;
    }
  }

  .inputSelectContain {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-top: 0px;
    margin-bottom: 5px;
    padding: 5px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;

    .sliderField {
      display: flex;
      flex-direction: column;
      width: 100%;
      justify-content: space-around;

      .sliderTitle {
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: space-between;
      }

      .valueSlider {
        width: 100%;
        height: 30px;
        display: flex;
        margin-bottom: 5px;

      }
    }

  }
}


</style>